<?php
    $this->breadcrumbs = array(
        t('Customer'),
    );

    /* $this->menu = array(
      array('label' => t('Create Customers'), 'url' => array('create')),
      array('label' => t('Manage Customers'), 'url' => array('admin')),
      ); */
?>

<h1><?php echo t('Customer'); ?></h1>

<?php
    $this->widget('bootstrap.widgets.TbButton', array(
        //'buttonType' => 'ajaxLink',
        'type' => 'primary',
        'label' => t('Create Customer'),
        'url' => $this->createURL('customers/create'),
        'icon' => 'icon-plus icon-white',
    ));
?>

<?php
    $this->widget('bootstrap.widgets.TbGridView', array(
        'type' => 'striped bordered condensed',
        'dataProvider' => $dataProvider,
        'template' => '{summary}{items}{pager}',
        'enablePagination' => true,
        'columns' => array(
            array('name' => 'id', 'header' => '#'),
            array('name' => 'customer_code', 'header' => t('Customer Code')),
            array('name' => 'firstname', 'header' => t('First Name')),
            array('name' => 'lastname', 'header' => t('Last Name')),
            array('name' => 'newic', 'header' => t('New IC')),
            array('name' => 'race', 'header' => t('Race')),
            array('name' => 'religion', 'header' => t('Religion')),
            array('name' => 'birthday', 'header' => t('Birthday')),
            array('name' => 'createdate', 'header' => t('Create Date')),
            array('name' => 'last_loan_num', 'header' => t('Loans')),
            //array('name' => 'status', 'header' => 'Language'),
            array(
                'class' => 'bootstrap.widgets.TbButtonColumn',
                'htmlOptions' => array('style' => 'width: 50px'),
                'template' => '{view}{update}{delete}',
            ),
        ),
    ));
?>
